package com.edu.medicalpro.GeRenZhongXin;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.Html;
import android.widget.EditText;
import android.widget.TextView;

import com.edu.medicalpro.R;
import com.edu.medicalpro.bean.Doctor1;
import com.edu.medicalpro.bean.DoctorData;
import com.edu.medicalpro.bean.PatientResult;
import com.edu.medicalpro.bean.User;
import com.edu.medicalpro.mvp.HomeContrace;
import com.edu.medicalpro.mvp.presenter.HomePresenter;

public class XinZengJiuZhenRenActivity extends AppCompatActivity implements HomeContrace.IView {
        private EditText huanzhename;
        private EditText code;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_xin_zeng_jiu_zhen_ren2);
        huanzhename=findViewById(R.id.huanzhename);
        code=findViewById(R.id.code);
    }

    @Override
    public void loginResult(User user) {
        String name=huanzhename.getText().toString();
        String codee=code.getText().toString();
        Doctor1 patient = new Doctor1();
        patient.setName(name);
        patient.setCardCode(codee);
        new HomePresenter(this).addPatient(patient);
    }

    @Override
    public void LoginError(Throwable throwable) {

    }

    @Override
    public void Result(PatientResult user) {

    }

    @Override
    public void DoctorResult(DoctorData doctor) {

    }
}